package jobhunter.model;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;

@Entity
public class User
{
	public Long getId() {
		return id;
	}


	public void setId(Long id) {
		this.id = id;
	}


	public String getFirstName() {
		return firstName;
	}


	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}


	public String getLastName() {
		return lastName;
	}


	public void setLastName(String lastName) {
		this.lastName = lastName;
	}


	public String getEmail() {
		return email;
	}


	public void setEmail(String email) {
		this.email = email;
	}


	public String getUsername() {
		return username;
	}
	public String getUserName() {
		return username;
	}


	public void setUsername(String username) {
		this.username = username;
	}


	public String getPassword() {
		return password;
	}


	public void setPassword(String password) {
		this.password = password;
	}


	public List<Company> getCompanies() {
		return companies;
	}


	public void setCompanies(List<Company> companies) {
		this.companies = companies;
	}


	public List<Process> getProcesses() {
		return processes;
	}


	public void setProcesses(List<Process> processes) {
		this.processes = processes;
	}


	@GeneratedValue
	@Id
	private Long id;	
	private String firstName;
	private String lastName;
	private String email;
	private String username;
	private String password;

	public User() {}
	
	
	public User(String username, String password) {
		super();
		this.username = username;
		this.password = password;
	}


	@OneToMany(mappedBy="user")
	List<Company> companies = new ArrayList<Company>();

	@OneToMany(mappedBy="user")
	List<Process> processes = new ArrayList<Process>();
				
}
